package belf.migrate.engine.ddl;

import belf.migrate.api.model.QualifiersModel;
import belf.migrate.api.table.schema.TablePath;
import belf.migrate.api.util.FieldCase;
import belf.migrate.api.util.JdbcUrlUtil;
import belf.migrate.api.util.QualifiedType;
import belf.migrate.plugin.dameng.DamengCatalog;
import belf.migrate.plugin.mysql.MySQLCatalog;

public class MySqlDDLConvertTestBase {
    protected static String SCHEMA = "SAKILA";
    protected static JdbcUrlUtil.UrlInfo urlInfo = new JdbcUrlUtil.UrlInfo(
            "jdbc:mysql://127.0.0.1:3306/sakila",
            "jdbc:mysql://127.0.0.1:3306",
            "localhost",
            3306,
            SCHEMA,
            ""
    );
    protected static JdbcUrlUtil.UrlInfo dmUrlInfo = new JdbcUrlUtil.UrlInfo(
            "jdbc:dm://localhost:5236?schema=" + SCHEMA,
            "jdbc:dm://localhost:5236",
            "localhost",
            5236,
            SCHEMA,
            ""
    );

    protected QualifiersModel qualifiersModel = new QualifiersModel("\"","\"", FieldCase.ORIGINAL, QualifiedType.DOT);
    protected TablePath tablePath = TablePath.of(SCHEMA, null,"film_text", qualifiersModel);

    protected static MySQLCatalog sourceCatalog = new MySQLCatalog("root", "root", urlInfo, SCHEMA, false);

    protected static DamengCatalog sinkCatalog = new DamengCatalog("sysdba", "test12345", dmUrlInfo, SCHEMA, true);
}
